package Object;

import java.io.InputStream;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class MyObjectInputStream {
    public static void main(String[] args) {
        try(
            //低级输出流//再利用低级流作为参数来创建对象输出流
            ObjectInputStream ois = new ObjectInputStream(new FileInputStream("D:\\software\\code\\2023_java\\2023_java_code\\code_24_4_26\\src\\Object\\ObjectText"));){
            User user = (User) ois.readObject();
            //将对象进行输出
            System.out.println(user);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
